package com.taxi.service;

import java.util.ArrayList;
import java.util.Map;

import com.taxi.bean.ChoferBean;
import com.taxi.daos.factory.DAOFactory;
import com.taxi.daos.interfaces.ChoferDAO;



public class ChoferServiceImpl implements ChoferService {

	DAOFactory daoFactory=DAOFactory.getDAOFactory(DAOFactory.MYSQL);
	ChoferDAO choferDAO=daoFactory.getChoferDAO();
			
	 
	public int registrarchofer(ChoferBean bean) throws Exception {
		return choferDAO.registrarchofer(bean);
	}

	 
	public ChoferBean codigoAutogenerado()throws Exception {
		// TODO Auto-generated method stub
		return choferDAO.codigoAutogenerado();
	}

	
	 
	public ArrayList<ChoferBean> listaChofer() throws Exception {
		// TODO Auto-generated method stub
		return choferDAO.listaChofer();
	}



	 
	public ChoferBean listarxnombresChofer(String nombres) throws Exception {
		// TODO Auto-generated method stub
		return choferDAO.listarxnombresChofer(nombres);
	}



	 
	public void actualizarChofer(ChoferBean bean) throws Exception {
		choferDAO.actualizarChofer(bean);		
	}



	 
	public void eliminarChofer(String codigo) throws Exception {
		choferDAO.eliminarChofer(codigo);				
	}

	 
	public ChoferBean obtenerPlacaPorChofer(int id) throws Exception {
		// TODO Auto-generated method stub
		return choferDAO.obtenerPlacaPorChofer(id);
	}


}
